package cn.linlane.entity.exception;

import cn.linlane.entity.errors.MyError;
import org.springframework.http.HttpStatus;

@SuppressWarnings("serial")
public class MyException extends RuntimeException {

	private HttpStatus httpStatus;

	private Integer errorCode;

	public MyException(MyError myError) {
		super(myError.getMessage());
		this.httpStatus = myError.getHttpStatus();
		this.errorCode = myError.getErrorCode();
	}

	public HttpStatus getHttpStatus() {
		return httpStatus;
	}

	public Integer getErrorCode() {
		return errorCode;
	}

}
